virtual int ray_intersect_test(vector& ro,vector& rd,float rad=0.0f)
Parameter | Type | Description |
---|---|---|
ro | vector& | ray origin |
rd | vector& | ray_direction |
rad | float | radius of collision |
Returns TRUE on any intersection, FALSE for no intersection.
This virtual function implements the ray intersection test with the object. It should return the first collision (not necessarily closest).
Its default behavior is to call get_mesh and if a mesh is returned, it calls the mesh ray_intersect_test.